package com.jk.service;

import com.jk.entity.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @详细介绍类情况.
 * @ClassName UserService
 * @Author 王倚天
 * @Date 2022/5/31
 * @Version 1.0
 */
@Component
@FeignClient(value = "cloth-provide")
public interface UserService {

    @RequestMapping("cloth/login")
    String login(@RequestBody UserEntity user);

    @RequestMapping("/cloth/getprovince")
    List<AreaEntity> getprovince(@RequestParam Integer pid);

    //调用查询购物车接口
    @RequestMapping(value = "/cart/findShopCart")
    Object findShopCart();

    //删除购物车商品
    @RequestMapping(value = "/cart/deleteById")
    void deleteById(@RequestParam Integer id);

    //发送验证码
    @RequestMapping(value = "/cloth/gainCode")
    String gainCode(@RequestParam String phone);

    @RequestMapping("/cloth/phoneRegister")
    String phoneRegister(@RequestBody UserEntity user);

    //批量删除购物车商品
    @RequestMapping(value = "/cart/deleteByIds")
    void deleteByIds(@RequestParam String[] ids);

    //注册
    @RequestMapping(value = "/cloth/register")
    String register(@RequestBody UserEntity user);

    //回显 购物车
    @RequestMapping(value = "/cart/getcartById")
    Object getcartById(@RequestParam Integer id);

    //修改 购物车
    @RequestMapping(value = "/cart/updateById")
    void updateById(@RequestBody ClothEntity cloth);

    //购物车 提交订单
    @RequestMapping(value = "/cart/submitOrder")
    void submitOrder(@RequestParam Integer sumprice,@RequestParam String[] ids);

    //购买记录
    @RequestMapping(value = "/cart/queryOrder")
    Object queryOrder();


}
